<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>商品管理</title>
<link rel="stylesheet" type="text/css" href="ui/themes/default/easyui.css"></link>
<link rel="stylesheet" type="text/css" href="ui/themes/icon.css"></link>
<script type="text/javascript" src="ui/jquery.min.js"></script>
<script type="text/javascript" src="ui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="ui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="ui/jquery.serializejson.min.js"></script>
<script type="text/javascript" src="ui/download.js"></script>
<script type="text/javascript" src="js/crud.js"></script>
<script type="text/javascript">
    var name="goods";
    height=300;
    var columns=[[
{field:'uuid',title:'编号',width:100},
{field:'name',title:'名称',width:100},
{field:'origin',title:'产地',width:100},
{field:'producer',title:'厂家',width:100},
{field:'unit',title:'计量单位',width:100},
{field:'inprice',title:'进货价格',width:100},
{field:'outprice',title:'销售价格',width:100},
{field:'goodstype',title:'商品类型',width:100,formatter:function(value){
	if(value){
		return value.name
	}
}},

            {field:'-',title:'操作',width:100,formatter: function(value,row,index){
                var oper = "<a href=\"javascript:void(0)\" onclick=\"edit(" + row.uuid + ')">修改</a>';
                oper += ' <a href="javascript:void(0)" onclick="del(' + row.uuid + ')">删除</a>';
                return oper;
            }}
        ]];

</script>
</head>
<body>
<div class="easyui-panel" style="padding-left:4px;border-bottom:0px;">
    <div style="height:2px;"></div>
    <form id="searchForm">
        名称：<input name="t1.name" >
产地：<input name="t1.origin" >
厂家：<input name="t1.producer" >
计量单位：<input name="t1.unit" ><br>
进货价格：<input name="t1.inprice" id="inprice1"> -> <input name="t2.inprice" id="inprice2">
销售价格：<input name="t1.outprice" id="outprice1"> -> <input name="t2.outprice" id="outprice2"><br>
商品类型：<input name="t1.goodstype.uuid" class="easyui-combobox" data-options="
    url:'goodstype!list.action',valueField:'uuid',textField:'name'
">
<button type="button" id="btnSearch">

</button>
    </form>
    <div style="height:2px;"></div>
</div>
<table id="grid"></table>

<div id="editDlg" style="padding:8px;">
    <form id="editForm">
        <input name="t.uuid" type="hidden"> 
<table>
            <tr>
    <td>名称</td><td><input name="t.name"> </td>
</tr>
<tr>
    <td>产地</td><td><input name="t.origin"> </td>
</tr>
<tr>
    <td>厂家</td><td><input name="t.producer"> </td>
</tr>
<tr>
    <td>计量单位</td><td><input name="t.unit"> </td>
</tr>
<tr>
    <td>进货价格</td><td><input name="t.inprice" class="easyui-numberbox" data-options="min:0,precision:2,prefix:'￥'"> </td>
</tr>
<tr>
    <td>销售价格</td><td><input name="t.outprice" class="easyui-numberbox" data-options="min:0,precision:2,prefix:'￥'"> </td>
</tr>
<tr>
    <td>商品类型</td><td><input name="t.goodstype.uuid" class="easyui-combobox" data-options="
    url:'goodstype!list.action',valueField:'uuid',textField:'name'
"> </td>
</tr>

        </table>
    </form>
</div>
<!-- 导入窗口 -->
<div id="doImportDlg" style="padding:2px;">
    <form id="doImportForm" enctype="multipart/form-data">
        导入文件：<input type="file" name="file">
    </form>
</div>
</body>
</html>
